package com.hospital.service.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hospital.service.project.entity.ProInfoBase;
import com.hospital.service.project.entity.help.ProInfoBaseHelp;
import com.hospital.service.system.entity.help.SysConfigurationHelp;
import com.hospital.service.system.model.param.SysConfigurationRemoveBatchParam;
import common.core.util.CommonUtil;
import common.core.util.CustomizeRuntimeException;
import enhance.plus.logic.LogicBaseServiceImpl;
import com.hospital.service.system.entity.SysConfiguration;
import com.hospital.service.system.mapper.SysConfigurationMapper;
import com.hospital.service.system.service.SysConfigurationService;
import org.springframework.stereotype.Service;

/**
* 系统配置表 接口
*
* @author AnKh
* @created 2020-10-11 20:27:11
*/
@Service
public class SysConfigurationServiceImpl extends LogicBaseServiceImpl<SysConfigurationMapper, SysConfiguration> implements SysConfigurationService{

    /**
     * 批量删除系统配置信息
     *
     * @param param 系统配置信息
     */
    @Override
    public void removeBatch(SysConfigurationRemoveBatchParam param) {
        if (CommonUtil.isEmpty(param)) {
            throw CustomizeRuntimeException.exception("传入的参数为空");
        }
        QueryWrapper<SysConfiguration> query = SysConfigurationHelp.createQuery();
        query.in(SysConfigurationHelp.id, param.getId());
        this.remove(query);
    }
}
